﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="UploadPicture.aspx.cs" Inherits="UploadPicture" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
 <div class="row">

                    <!-- Bread Crumb Start -->
               <%--     <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                        <ol class="breadcrumb">
                            <li><a href="javascript:;">Cười Haha</a></li>
                            <li class="active">Xem Gì</li>
                        </ol>
                    </div>--%>
                    <!-- Bread Crumb End -->
                    <!-- Gray Sidebar Start -->
                    <div class="col-lg-3 col-md-12 col-sm-12 col-xs-12 equalcol graysidebar">

                        <div class="widget">
                            
                            <div class="categorieslist user-cate-list">
                                <ul>
                                    <li class="active"><a href="javascript:;"><i class="fa fa-bar-chart-o"></i> Kênh của tôi</a> </li>
                                    <li> <a href="javascript:;"><i class="fa fa-sign-in"></i> Đăng ký của tôi</a> </li>
                                    <li> <a href="javascript:;"><i class="fa fa-video-camera"></i> Lịch sử đã xem</a> </li>
                                    <li> <a href="javascript:;"><i class="fa fa-flag"></i> Duyệt qua kênh</a> </li>
                                </ul>
                            </div>
                        </div>
                        <div class="clearfix"></div>

                        <!-- Recent Post Widget start -->
                        <div class="widget left-share">
                            <h2 class="help-block">Kết nối với Thapcam.vn</h2>
                            <div class="text">
                                <a href="javascript:;" class="btn btn-primary btn-sm"><i class="fa fa-thumbs-up"></i>&nbsp;Like</a>
                                <a href="javascript:;" class="btn btn-primary btn-sm"><i class="fa fa-facebook"></i>&nbsp;Share</a>

                            </div>
                        </div>
                        <div class="clearfix"></div>
                        <!-- Recent Post Widget end -->

                    </div>
                    <!-- Gray Sidebar End -->
                    <!-- Content Column Start -->
                    <div class="col-lg-9 col-md-12 col-sm-12 col-xs-12 equalcol conentsection">
                    <form method="post">
                        <!-- Contents Section Started -->
                        <div class="clearfix">

                            <div class="form-group has-success">
                                <label class="control-label" for="inputSuccess1">Tiêu Đề</label>
                                <input type="text" id="txtTitle" name="txtTitle" class="form-control">   
                                <label id="lbErrorTitle" style="color:red"></label>                             
                            </div>
                            <div class="form-group has-success">
                                <label class="control-label" for="inputSuccess1">Suy nghĩ cảm nhận của bạn</label>
                                <input type="text" id="txtLead" name="txtLead" class="form-control">
                            </div>
                            <div class="form-group has-success">
                                <label class="control-label" for="inputSuccess1">Chọn file đưa lên</label>
                                <div class="radio">
                                    <label class="col-lg-3">
                                        <input type="radio" name="optionsRadios" id="optionsImage" value="1" checked="">
                                        Chọn file từ máy tính của bạn
                                    </label>
                                    <label class="col-lg-7">                                       
                                        <input type="file" id="exampleInputFile">
                                        <asp:FileUpload ID="flUpload" runat="server" />
                                    </label>
                                </div>
                                <div class="clearfix"></div>
                                <div class="radio">
                                    <label class="col-lg-2">
                                        <input type="radio" name="optionsRadios" id="optionsVideo" value="2" checked="">
                                        Dùng link có sẵn(youtube)
                                    </label>
                                    <label class="col-lg-5">
                            <input type="text" id="txtLinkVideo" name="txtLinkVideo" class="form-control" placeholder="Link">
                                    </label>
                                </div>
                            </div>

                            <div class="clearfix"></div>
                            <button type="submit" class="btn btn-success" onclick="return CheckUploadPicture()" >Hoàn Thành</button>
                        </div>
                        <div class="clearfix"></div>
                        <!-- Contents Section End -->
                        <input type="hidden" id="hdChooseType" name="hdChooseType" value="-1" />
                        </form>
                    </div>
                    <!-- Content Column End -->




                </div>

                <script type="text/javascript">
                    function CheckUploadPicture() {
                        var title = $('#txtTitle').val();
                        var check = true;
                        if (document.getElementById('optionsImage') == true) {
                            $('#hdChooseType').val(1);
                        }
                        if (document.getElementById('optionsVideo') == true) {
                            $('#hdChooseType').val(2);
                        }
                        
                        if (title == "") {
                            $('#lbErrorTitle').text("Vui lòng nhập tiêu để");
                            check = false;
                        }
                        var type=$('#hdChooseType').val();
                        if (type == -1) {
                            return false;
                        }
                        else{
                            return true;
                        }

                    }
                </script>
</asp:Content>

